<template>
  <div>
    <h1>{{ testTitle }}</h1>
    <h1>{{ testTime }}</h1>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'

const testTitle = ref('Home')
const testTime = ref('')

onMounted(() => {
  const testService = (window as any).testService
  testService.hello('World').then((result) => {
    testTitle.value = result.message
  })
  testService.getTime().then((result) => {
    testTime.value = result.time || ''
  })
})
</script>

<style scoped lang="scss"></style>